CC:=gcc

fork: 01_fork.c
	-$(CC) $^ -o $@
	-./$@
	-rm $@

other: 02_other.c
	-$(CC) $^ -o $@

execve: 02_execve.c
	-$(CC) $^ -o $@
	-./$@
	-rm $@

waitpid: 03_waitpid.c
	-$(CC) $^ -o $@
	-./$@
	-rm $@

pipe: 04_pipe.c
	-$(CC) $^ -o $@
	-./$@
	-rm $@

share_memory: 05_share_memory.c
	-$(CC) $^ -o $@
	-./$@
	-rm $@

shm_block: 05_shm_block.c
	-$(CC) $^ -o $@
	-./$@
	-rm $@

mqueue: 06_mqueue.c
	-$(CC) $^ -o $@
	-./$@
	-rm $@

producer: 07_producer.c
	$(CC) -o $@ $^

consumer: 07_consumer.c
	$(CC) -o $@ $^

.PHONY=pc_mq

pc_mq: producer consumer

signal: 08_signal.c
	-$(CC) -o $@ $^
	-./$@
	-rm ./$@

shm: 09_shm.c
	-$(CC) -o $@ $^
	-./$@
	-rm ./$@

sem_count: 10_sem_count.c
	-$(CC) -o $@ $^
	-./$@
	-rm ./$@